/* 球队数据统计板块样式 */
.stats-section {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 30px;
  margin-bottom: 30px;
}

.stats-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e2e8f0;
}

.section-icon {
  font-size: 2em;
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-title {
  font-size: 1.8em;
  color: #2d3748;
  font-weight: 700;
  margin: 0;
}

.section-subtitle {
  color: #718096;
  font-size: 0.95em;
  margin: 5px 0 0 0;
}

/* 统计控制面板 */
.stats-control-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 20px;
}

.season-selector {
  display: flex;
  align-items: center;
  gap: 10px;
}

.season-selector label {
  color: #4a5568;
  font-weight: 500;
  white-space: nowrap;
}

.season-select {
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: white;
  color: #4a5568;
  font-size: 0.9em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.season-select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.data-refresh-indicator {
  display: flex;
  align-items: center;
  gap: 15px;
}

.last-updated {
  color: #718096;
  font-size: 0.9em;
}

.refresh-btn {
  padding: 8px 16px;
  border: 1px solid #e2e8f0;
  background: white;
  color: #4a5568;
  border-radius: 8px;
  font-size: 0.9em;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.refresh-btn:hover {
  background: #f7fafc;
  border-color: #cbd5e0;
}

/* 核心数据卡片 */
.team-stats-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.stats-highlight {
  width: 100%;
}

.stats-highlight-card {
  display: flex;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 16px;
  padding: 30px;
  color: white;
  align-items: center;
  gap: 40px;
}

.highlight-content {
  flex: 1;
}

.highlight-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.highlight-title {
  font-size: 1.2em;
  font-weight: 600;
  opacity: 0.9;
}

.highlight-icon {
  font-size: 1.2em;
}

.highlight-value-wrapper {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}

.highlight-value {
  font-size: 3em;
  font-weight: 700;
}

.highlight-trend {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 1.1em;
  font-weight: 600;
}

.trend-arrow.up {
  color: #4caf50;
}

.trend-arrow.down {
  color: #f44336;
}

.highlight-description {
  font-size: 0.95em;
  opacity: 0.8;
}

.highlight-chart {
  flex-shrink: 0;
}

.win-rate-circle {
  position: relative;
}

.circle-progress {
  position: relative;
}

.circle-svg {
  transform: rotate(-90deg);
}

.circle-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 10;
}

.circle-progress-bar {
  fill: none;
  stroke: white;
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 283; /* 2 * π * 45 */
  stroke-dashoffset: calc(283 - (var(--percentage) / 100 * 283));
  transition: stroke-dashoffset 1s ease;
}

/* 详细数据网格 */
.team-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.stat-card {
  background: white;
  border-radius: 16px;
  border: none;
  padding: 30px 20px;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: var(--card-gradient);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.stat-card-primary {
  --card-gradient: linear-gradient(90deg, #667eea, #764ba2);
}

.stat-card-secondary {
  --card-gradient: linear-gradient(90deg, #f093fb, #f5576c);
}

.stat-card-success {
  --card-gradient: linear-gradient(90deg, #43e97b, #38f9d7);
}

.stat-card-warning {
  --card-gradient: linear-gradient(90deg, #faf089, #f6d365);
}

.stat-card-danger {
  --card-gradient: linear-gradient(90deg, #fe6b8b, #ff8e53);
}

.stat-card-info {
  --card-gradient: linear-gradient(90deg, #4facfe, #00f2fe);
}

.stat-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
  position: relative;
}

.stat-icon {
  font-size: 2.5em;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
}

.stat-card-secondary .stat-icon {
  background: rgba(240, 147, 251, 0.1);
  color: #f093fb;
}

.stat-card-success .stat-icon {
  background: rgba(67, 233, 123, 0.1);
  color: #43e97b;
}

.stat-card-warning .stat-icon {
  background: rgba(250, 240, 137, 0.1);
  color: #faf089;
}

.stat-card-danger .stat-icon {
  background: rgba(254, 107, 139, 0.1);
  color: #fe6b8b;
}

.stat-card-info .stat-icon {
  background: rgba(79, 172, 254, 0.1);
  color: #4facfe;
}

.stat-badge {
  position: absolute;
  top: 0;
  right: 0;
  transform: translate(30%, -30%);
  padding: 6px 10px;
  border-radius: 16px;
  font-size: 0.75em;
  font-weight: 600;
  background: #667eea;
  color: white;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.stat-body {
  margin-bottom: 15px;
  width: 100%;
}

.stat-number {
  font-size: 2.8em;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 8px;
  line-height: 1.1;
}

.stat-label {
  color: #718096;
  font-size: 1em;
  font-weight: 500;
}

.stat-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.stat-description {
  color: #718096;
  font-size: 0.85em;
  max-width: 100%;
  margin-bottom: 12px;
}

.stat-progress {
  width: 100%;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #f1f5f9;
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--card-gradient);
  transition: width 1s ease;
}

.stat-description {
  color: #718096;
  font-size: 0.85em;
  max-width: 150px;
}

.stat-progress {
  width: 80px;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(45deg, #667eea, #764ba2);
  transition: width 1s ease;
}

/* 赛季表现对比 */
.season-comparison {
  background: white;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 25px;
}

.comparison-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.comparison-title {
  font-size: 1.3em;
  color: #2d3748;
  font-weight: 600;
  margin: 0;
}

.comparison-toggle {
  display: flex;
  gap: 5px;
}

.toggle-btn {
  padding: 8px 16px;
  border: 1px solid #e2e8f0;
  background: white;
  color: #4a5568;
  border-radius: 8px;
  font-size: 0.9em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.toggle-btn:hover {
  background: #f7fafc;
}

.toggle-btn.active {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

.season-chart {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.season-item {
  display: flex;
  align-items: flex-end;
  gap: 15px;
}

.season-name {
  width: 80px;
  font-weight: 600;
  color: #4a5568;
  text-align: right;
}

.season-bar-wrapper {
  flex: 1;
  height: 60px;
  position: relative;
  display: flex;
  align-items: center;
}

.season-bar {
  height: 30px;
  border-radius: 15px;
  transition: width 1s ease;
}

.season-bar-primary {
  background: linear-gradient(90deg, #667eea, #764ba2);
}

.season-highlight {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8em;
  font-weight: 500;
  color: #4a5568;
  white-space: nowrap;
}

.season-winrate {
  width: 60px;
  font-weight: 700;
  color: #667eea;
  text-align: left;
}

/* 最近比赛结果 */
.recent-matches {
  margin-top: 40px;
}

.match-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.match-card {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition);
}

.match-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.match-team {
  display: flex;
  align-items: center;
  gap: 10px;
}

.match-team-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.match-team-name {
  font-weight: 600;
}

.match-result {
  text-align: center;
  padding: 0 15px;
}

.match-score {
  font-size: 1.5rem;
  font-weight: 700;
}

.match-date {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 5px;
}

.match-winner {
  color: var(--success);
  font-weight: 600;
}

/* 补充缺失的变量定义 */
:root {
  --text-dark: #1e293b;
  --primary: #667eea;
}

.stats-title {
  font-size: 1.3rem;
  color: var(--text-dark);
  margin-bottom: 25px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.stats-title i {
  color: var(--primary);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .stats-section {
    padding: 30px 15px;
  }

  .stats-highlight-card {
    flex-direction: column;
    text-align: center;
    gap: 20px;
    padding: 25px;
  }

  .highlight-value-wrapper {
    justify-content: center;
  }

  .team-stats-grid {
    grid-template-columns: 1fr;
  }

  .comparison-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .recent-matches {
    flex-direction: column;
  }

  .stat-card,
  .match-card {
    min-width: auto;
  }

  .match-content {
    flex-direction: column;
    gap: 15px;
  }

  .team {
    flex-direction: column;
    text-align: center;
  }

  .home-team .team-details,
  .away-team .team-details {
    align-items: center;
  }

  .match-vs {
    margin: 10px 0;
  }

  .team-score {
    font-size: 1.5em;
  }
}

@media (max-width: 480px) {
  .stats-section {
    padding: 20px 10px;
  }

  .stats-control-panel {
    flex-direction: column;
    align-items: flex-start;
  }

  .season-item {
    gap: 10px;
  }

  .season-name {
    width: 70px;
    font-size: 0.9em;
  }

  .season-winrate {
    width: 50px;
    font-size: 0.9em;
  }

  .stat-card,
  .match-card {
    padding: 20px 15px;
  }

  .stat-number {
    font-size: 1.5em;
  }

  .stat-label {
    font-size: 0.8em;
  }

  .match-title {
    font-size: 1em;
  }

  .team-avatar {
    width: 40px;
    height: 40px;
  }

  .team-logo {
    font-size: 20px;
  }

  .team-name {
    font-size: 0.9em;
  }
}
